|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hep.analysis.Job
A Job is used as a container for Histograms, Pages, Plots etc. When running in a GUI environment the Job is normally implicitly created for you. When running in standalone (or batch) mode you should create the Job yourself. The Job has methods for
import hep.analysis.*; import java.util.Random; public class StandaloneTest { public static void main(String[] argv) { Random random = new Random(); Job job = new Job("Test Job"); Histogram hist = new Histogram("Gaussian Test"); for (int i=0; i<10000; i++) hist.fill(random.nextGaussian()); job.dump(); job.save("test.javahist"); } }
Constructor Summary | |
Job(java.lang.String name)
Create a job |
Method Summary | |
void |
addEventAnalyzer(EventAnalyzer analyzer)
Add an event analyzer to this job. |
void |
dump()
Produces a dump of all the NamedObjects (such as histograms) created during the current job. |
void |
dump(java.io.PrintWriter out)
Produces a dump of all the NamedObjects (such as histograms) created during the current job. |
void |
go()
Run the Job. |
void |
go(int n)
Run the job for a specified maximum number of events. |
void |
removeAllEventAnalyzers()
Remove all the event analyzers from this job. |
void |
removeEventAnalyzer(EventAnalyzer analyzer)
Remove an event analyzer. |
void |
rewind()
Rewind the event source to the beginning and, by default, clear all of the histograms in the job. |
void |
save()
Saves all the NamedObjects (such as Histograms) in this job to disk. |
void |
save(java.io.File file)
Save all the NamedObjects (such as Histograms) in this job to disk. |
void |
save(java.io.ObjectOutputStream out)
Save all the NamedObjects (such as Histograms) in this job. |
void |
save(java.lang.String fileName)
Save all the NamedObjects (such as Histograms) in this job to disk. |
void |
setEventSource(EventSource source)
Add an event source to this job. |
void |
step()
Run the jon for a single event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Job(java.lang.String name)
The
- name for the jobMethod Detail |
public void setEventSource(EventSource source)
The
- EventSource to addpublic void addEventAnalyzer(EventAnalyzer analyzer)
analyzer
- The EventAnalyzer to addpublic void removeEventAnalyzer(EventAnalyzer analyzer)
analyzer
- The EventAnalyzer to removepublic void removeAllEventAnalyzers()
public void go()
public void step()
public void go(int n)
public void rewind()
Histogram.setClearOnRewind(boolean)
,
HistogramFolder.setClearOnRewind(boolean)
public void save()
public void save(java.lang.String fileName)
fileName
- The name of the file to create. By convention the filetype should be
.javahist.public void save(java.io.File file)
file
- The file to create. By convention the filetype should be
.javahist.public void save(java.io.ObjectOutputStream out) throws java.io.IOException
out
- An ObjectOutputStream to write the Histograms to.save(File)
,
save(String)
public void dump()
public void dump(java.io.PrintWriter out)
out
- The PrintWriter to write to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |